The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.
Changes 04
MANIFEST 01
META.json 079
META.yml 33
README 11
inc/My/Builder/Unix.pm 521
lib/Alien/SDL.pm 22
7 files changed (This is a version diff) 11111
@@ -1,5 +1,9 @@
 Revision history for Perl module Alien::SDL
 
+1.427 Sun Jun 18 2011
+     - SDL_Pango needs newer libtool to process ld scripts (like on ubuntu), patch added [FROGGS]
+     - using `uname -a` to detect sparc systems to disable MMX [FROGGS]
+
 1.426 Sun Apr 24 2011
      - added '--disable-sdltest' to SDL_mixer|ttf|gfx|Pango's configure for darwin [FROGGS]
      - fixing 'Use of uninitialized value ..' warnings in ACTION_install [kmx]
@@ -25,3 +25,4 @@ t/002_config.t
 t/003_check_header.t
 t/004_get_header_version.t
 TODO
+META.json
@@ -0,0 +1,79 @@
+{
+   "abstract" : "Get, Build and Use SDL libraries",
+   "author" : [
+      "Kartik Thakore <KTHAKORE@cpan.org>"
+   ],
+   "dynamic_config" : 1,
+   "generated_by" : "Module::Build version 0.38, CPAN::Meta::Converter version 2.110930",
+   "license" : [
+      "perl_5"
+   ],
+   "meta-spec" : {
+      "url" : "http://search.cpan.org/perldoc?CPAN::Meta::Spec",
+      "version" : "2"
+   },
+   "name" : "Alien-SDL",
+   "prereqs" : {
+      "build" : {
+         "requires" : {
+            "Archive::Extract" : 0,
+            "Archive::Tar" : 0,
+            "Archive::Zip" : 0,
+            "Digest::SHA" : 0,
+            "ExtUtils::CBuilder" : 0,
+            "File::Fetch" : "0.24",
+            "File::Find" : 0,
+            "File::Path" : "2.08",
+            "File::ShareDir" : 0,
+            "File::Spec" : 0,
+            "File::Temp" : 0,
+            "File::Which" : 0,
+            "Module::Build" : "0.36",
+            "Text::Patch" : "1.4"
+         }
+      },
+      "configure" : {
+         "requires" : {
+            "Archive::Extract" : 0,
+            "Digest::SHA" : 0,
+            "File::Fetch" : "0.24",
+            "File::Find" : 0,
+            "File::Path" : "2.08",
+            "File::ShareDir" : 0,
+            "File::Spec" : 0,
+            "File::Which" : 0,
+            "Module::Build" : "0.36",
+            "Text::Patch" : "1.4"
+         }
+      },
+      "runtime" : {
+         "requires" : {
+            "Capture::Tiny" : 0,
+            "ExtUtils::CBuilder" : 0,
+            "File::ShareDir" : "1.00",
+            "File::Spec" : 0,
+            "File::Temp" : 0,
+            "File::Which" : 0
+         }
+      }
+   },
+   "provides" : {
+      "Alien::SDL" : {
+         "file" : "lib/Alien/SDL.pm",
+         "version" : "1.427"
+      }
+   },
+   "release_status" : "stable",
+   "resources" : {
+      "bugtracker" : {
+         "web" : "http://sdlperl.ath.cx/projects/SDLPerl/query?component=Alien%3A%3ASDL&status=!closed"
+      },
+      "license" : [
+         "http://dev.perl.org/licenses/"
+      ],
+      "repository" : {
+         "url" : "http://github.com/PerlGameDev/Alien-SDL"
+      }
+   },
+   "version" : "1.427"
+}
@@ -29,7 +29,7 @@ configure_requires:
   Module::Build: 0.36
   Text::Patch: 1.4
 dynamic_config: 1
-generated_by: 'Module::Build version 0.3607'
+generated_by: 'Module::Build version 0.38, CPAN::Meta::Converter version 2.110930'
 license: perl
 meta-spec:
   url: http://module-build.sourceforge.net/META-spec-v1.4.html
@@ -38,7 +38,7 @@ name: Alien-SDL
 provides:
   Alien::SDL:
     file: lib/Alien/SDL.pm
-    version: 1.426
+    version: 1.427
 requires:
   Capture::Tiny: 0
   ExtUtils::CBuilder: 0
@@ -50,4 +50,4 @@ resources:
   bugtracker: http://sdlperl.ath.cx/projects/SDLPerl/query?component=Alien%3A%3ASDL&status=!closed
   license: http://dev.perl.org/licenses/
   repository: http://github.com/PerlGameDev/Alien-SDL
-version: 1.426
+version: 1.427
@@ -2,7 +2,7 @@ NAME
     Alien::SDL - building, finding and using SDL binaries
 
 VERSION
-    Version 1.426
+    Version 1.427
 
 SYNOPSIS
     Alien::SDL tries (in given order) during its installation:
@@ -7,6 +7,7 @@ use base 'My::Builder';
 use File::Spec::Functions qw(catdir catfile rel2abs);
 use My::Utility qw(check_header check_prereqs_libs check_prereqs_tools);
 use Config;
+use Capture::Tiny;
 
 # $Config{cc} tells us to use gcc-4, but it is not there by default
 if($^O eq 'cygwin') {
@@ -95,6 +96,8 @@ sub build_binaries {
         }
       }
 
+      $self->do_system('cp ../SDL-1.2.14/libtool libtool') if $pack->{pack} eq 'SDL_Pango';
+
       # do 'make install'
       my @cmd = ($self->_get_make, 'install');
       print "Running make install $pack->{pack}...\n";
@@ -113,16 +116,23 @@ sub _get_configure_cmd {
   my ($self, $pack, $prefixdir) = @_;
   my $extra                     = '';
   my $extra_cflags              = "-I$prefixdir/include";
-  my $extra_ldflags             = "-L$prefixdir/lib";  
+  my $extra_ldflags             = "-L$prefixdir/lib";
+  my $extra_PATH                = "";
+  my $uname                     = $Config{archname};
+  my $stdout                    = '';
+  my $stderr                    = '';
   my $cmd;
+  
+  ($stdout, $stderr) = Capture::Tiny::capture { print `uname -a`; };
+  $uname .= " $stdout" if $stdout;
 
   # NOTE: all ugly IFs concerning ./configure params have to go here
 
-  if(($pack eq 'SDL_gfx') && $Config{archname} =~ /(powerpc|ppc|64|2level|alpha|armv5)/i) {
+  if($pack eq 'SDL_gfx' && $uname =~ /(powerpc|ppc|64|2level|alpha|armv5|sparc)/i) {
     $extra .= ' --disable-mmx';
   }
   
-  if(($pack eq 'SDL') && ($Config{archname} =~ /(powerpc|ppc)/)) {
+  if($pack eq 'SDL' && $uname =~ /(powerpc|ppc)/) {
     $extra .= ' --disable-video-ps3';
   }
 
@@ -139,7 +149,7 @@ sub _get_configure_cmd {
     $extra .= ' --disable-sdltest';
   }
 
-  if(($pack eq 'SDL') && ($Config{archname} =~ /solaris/) && !check_header($extra_cflags, 'sys/audioio.h')) {
+  if($pack eq 'SDL' && $^O eq 'solaris' && !check_header($extra_cflags, 'sys/audioio.h')) {
     $extra .= ' --disable-audio';
   }
 
@@ -162,6 +172,12 @@ sub _get_configure_cmd {
     $extra .= " --disable-ld-version-script";
   }
 
+  if($^O eq 'solaris' && -d '/usr/ccs/bin') {
+    # otherwise we get "false cru build/libSDLmain.a build/SDL_dummy_main.o"
+    # see http://fixunix.com/ntp/245613-false-cru-libs-libopts-libopts_la-libopts-o.html#post661558
+    $extra_PATH = ':/usr/ccs/bin';
+  }
+
   ### This was intended as a fix for http://www.cpantesters.org/cpan/report/7064012
   ### Unfortunately does not work.
   #
@@ -185,7 +201,7 @@ sub _get_configure_cmd {
   }
 
   # we need to have $prefixdir/bin in PATH while running ./configure
-  $cmd = "PATH=\"$prefixdir/bin:\$PATH\" $cmd";
+  $cmd = "PATH=\"$prefixdir/bin:\$PATH$extra_PATH\" $cmd";
 
   return $cmd;
 }
@@ -16,11 +16,11 @@ Alien::SDL - building, finding and using SDL binaries
 
 =head1 VERSION
 
-Version 1.426
+Version 1.427
 
 =cut
 
-our $VERSION = '1.426';
+our $VERSION = '1.427';
 $VERSION = eval $VERSION;
 
 =head1 SYNOPSIS